package com.komlin.libcommon.util.android;

/**
 * @author yawei
 * @data on 17-11-17  上午10:19
 * @project furling3d
 * @org www.komlin.com
 * @email zyawei@live.com
 */

public class ClickTimer {
    /**
     * ms
     */
    private static final long TIME_OUT = 1000;
    private static long time;
    private static long recordTag;

    public static boolean check(long tag) {
        if (recordTag != tag) {
            recordTag = tag;
            return true;
        }
        long newTime = System.currentTimeMillis();
        boolean result = newTime - time > TIME_OUT;
        if (result){
            time = newTime;
        }
        return result;
    }


}
